import request from '@/utils/request'

export function addBanner(areaId, data) {
  return request({
    url: `/admin/${areaId}/addbanner`,
    method: 'post',
    data: data
  })
}

export function updateBanner(areaId, data) {
  return request({
    url: `/admin/${areaId}/updatebanner`,
    method: 'post',
    data: data
  })
}

export function deleteBanner(areaId, bannerId) {
  return request({
    url: `/admin/${areaId}/${bannerId}/deletebanner`,
    method: 'post'
  })
}

export function categoryList(areaId) {
  return request({
    url: `/admin/${areaId}/categoryList`,
    method: 'get'
  })
}
